function loadPage(url) {
    window.location.href = url;
}
function loadPageWithBlank(url) {
    window.open(url);
}
function zhuxiao(){
    var storage = window.localStorage;
    storage.clear();
}

$('#layerDemo .layui-btn').on('click', function(){
    var othis = $(this), method = othis.data('method');
    active[method] ? active[method].call(this, othis) : '';
});
$('.layui-btn').on('click', function(){
    var type = $(this).data('type');
    active[type] ? active[type].call(this) : '';
});

function serializeObject(form){
    var o ={};
    $.each(form.serializeArray(),function(index){
        if(o[this['name']]){
            o[this['name']] = o[this['name']] +","+this['value'];

        }else{
            o[this['name']] = this['value'];
        }
    });
    return o;
}